package com.example.campusannouncement.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "news-service", url = "http://localhost:8080")
public interface NewsClient {
    
    @GetMapping("/api/news/titles")
    List<String> getAllNewsTitles();

    @GetMapping("/api/news/search")
    String searchNewsByTitle(@RequestParam("title") String title);
} 